package com.example.fw;

import org.openqa.selenium.By;

public class NavigationHelper extends HelperWithWebDriverBase {

	public NavigationHelper(ApplicationManager manager) {
		super(manager);
	}

	public void goToGroupsPage() {
		if (isElementPresent(By.xpath("//input[@value='New group']"))) {
		return;
		}	
		click(By.linkText("groups"));
	}

	public void openMainPage() {
		getURL(manager.getProperty("baseUrl"));
	}

	public void returnToHomePage() {
		click(By.linkText("home page"));
	}

	public void returnToGroupPage() {
		click(By.linkText("group page"));
	}

	protected void initContactCreation() {
		click(By.linkText("add new"));
	}
}
